package com.lineage.server.clientpackets;

import com.lineage.echo.ClientExecutor;
import com.lineage.server.datatables.lock.CharBookReading;
import com.lineage.server.model.Instance.L1PcInstance;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class C_DeleteBookmark extends ClientBasePacket {
  private static final Log _log = LogFactory.getLog(C_DeleteBookmark.class);
  
  public void start(byte[] decrypt, ClientExecutor client) {
    try {
      read(decrypt);
      String bookmarkname = readS();
      if (!bookmarkname.isEmpty()) {
        L1PcInstance pc = client.getActiveChar();
        CharBookReading.get().deleteBookmark(pc, bookmarkname);
      } 
    } catch (Exception exception) {
    
    } finally {
      over();
    } 
  }
  
  public String getType() {
    return getClass().getSimpleName();
  }
}
